/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        test(new Robot());//只需实现接口即可
        test(new Bird());
        test(new Dog());
    }
    public static void test(Animal a){
        Animal animal = a;
        a.walk();
    }
}